Repository navigation
Conversation
zayenz
added this pull request to stack #254
October 10, 2026 18:20
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several MiniZinc relations still use decompositions despite matching Gecode propagators. This PR connects those propagators through standard
fzn_hooks and provides explicit modelling predicates for native constraints without a suitable standard hook.Standard globals keep MiniZinc's public overloads, assertions, index handling and optional-value translations. The solver library overrides the typed hooks for count inequalities, conditionals, nondeterministic regular, optional distinctness and scheduling, and set intersection. Low-level builtin redefinitions handle set/float extrema, float powers, set matrix element and scalar implication. The public overrides in
solver-native-overloads.mznare removed.gecode.mzncontains documented modelling interfaces for offset distinctness, array inequality, arbitrary-tie sorting and extrema, NValues/among/matching-count bounds, native arithmetic and products, distance constraints, optional successor paths, optional rectangles and additional set relations. The interfaces lower enums and array indexes to typed FlatZinc bindings ingecode_fzn.mzn. Paths use absent terminal successors, and rectangle origins encode absence together. Reification uses native forms or standard decompositions where available; unsupported forms are documented. Duplicate standard globals, sparse GCC, task-type dispatch and generic relation/operation-code APIs are removed.Annotations select basic, advanced or combined propagation and single or pairwise minimum-distance actors. Fixed-base float powers and inverse logarithms use explicit MPFR rounding; compiler rounding flags match the parent branch. Divmod bounds are available before dependent linear constraints are posted. General variable-base/variable-exponent float powers remain unsupported.
The interface review also fixed present integer path successors being mistaken for the native terminal marker, a rectangle primitive shadowing the modelling overload, and exceptions for fixed negative inter-distance values. Negative distances now fail consistently with the variable form.
GitHub stack #254: #249 → #247 → #253. This draft is based on #247 (
feature/inter-distance).Validation of the revised library:
fzn-gecodeandgecode-test; all 137 FlatZinc regressions passed.f950541on all 28 edited MiniZinc files or added sections. Checked parsing, tokens, comments and formatter second-pass stability; preserved include order and existing untouched prefixes. Manually corrected fitting quantified condition chains and conditional comprehensions. Local Zincite tasksbase-102andbase-103record these layout problems.The Challenge measurements below are historical results from earlier PR iterations. They preceded restoration of the parent compiler flags, the local MPFR correction and this library reorganization. They do not establish performance of the final interfaces or float implementation.
MiniZinc Challenge validation (corpus
a8448864fc56162583f24aaf9c25653d93f83765, MiniZinc 2.10.1):